nexusadventuresfandomcom-20200214-history
User blog:Gstomi1/Pascal Calculator(Not Blaise's one): Finished!
Hey people! OBI Result's here, had 100/300 points, most likely i'm not going to Stage 2 :( But anyway, here's a program that I build: program isicalculator; var entrance : integer; version : integer; result, result1, result2, result3, result4 : integer; {Square Number Calculator} procedure Square; var square1 : integer; begin writeln('Thanks. Which number you wanna convert to its square number?') ; read(square1); result := square1 * square1 ; writeln('Ok! Your number is: ', result) ; end; {Triangle Number Calculator} Procedure Triangle; var triangle1, triangle2 : integer; begin writeln('Thanks. Which numer you want to convert to its triangular number?'); read(triangle1); triangle2 := triangle1 + 1; result2 := triangle1 * triangle2 div 2; writeln('Thanks! Your triangular number is: ', result2); end; {Error Section} Procedure Other; begin writeln('Unfornatly you wrote wrong. Try again later! You wrote ', entrance, ' but this isnt a accept entrance. For trying again, re-open the app.'); end; {Credits Section} Procedure Credits; begin writeln('Made by Gabriel Tomitsuka for iTomi Systems Incorporated.'); writeln('Brazilian Techology. Thanks for The Tomitsuka Family, for support.'); writeln('The maths of this program is from Dr. Manfred Salvermoser - PhD in Atomic Physics and Wikipedia.'); writeln('I learned Pascal with my Aunt, Celia, my Schools Professor, Roberto Pereira Cunha and from Dr. Tao Yue Website, TaoYue.com'); writeln('Created with Lazarus, by Free Pascal Team. Thanks!'); end; {Multiplication Section} Procedure Multiplication; var multipli1, multipli2 : integer; begin; writeln('Thanks. Please write your multiplicand: '); readln(multipli1); writeln('Ok! Please write your multiplier: '); readln(multipli2); result1 := multipli1 * multipli2; writeln('Your product is:', result1); end; {Addition Section} Procedure Addition; var add1, add2 : integer; begin; writeln('Thanks. Please write your first addend: '); readln(add1); writeln('Ok! Please write your second addend: '); readln(add2); result3 := add1 + add2; writeln('Your sum is:', result3); end; {Subtraction Section} Procedure Subtraction; var sub1, sub2 : integer; begin; writeln('Thanks. Please write your minuend: '); readln(sub1); writeln('Ok! Please write your subtrahend: '); readln(sub2); result4 := sub1 - sub2; writeln('Your difference is:', result4); end; {Exponentiation Section} Procedure Exponentiation; var exp1, exp2, result5 : extended; begin; writeln('NOTICE: There were reports of people saying that there is a bug here.'); writeln('Our team is going to change some things here, and it will work. Thanks!'); writeln('Thanks. Please write your base: '); readln(exp1); writeln('Ok! Please write your exponent: '); readln(exp2); result5 := exp(exp1 * ln(exp2)); writeln('Your power is:', result5); end; {Division Section} Procedure Division; var div1, div2, result6 : real; begin; writeln('Thanks. Please write your dividend: '); readln(div1); writeln('Ok! Please write your divisor: '); readln(div2); result6 := div2 / div1; writeln('Your quotient is:', result6); end; {One way section, start of the visible part of the app} begin {When you update the version of the app, change the version variable!} version := (2); writeln('Welcome to ISI Calculator Version 1.', version,'. Press enter to start!'); readln(); writeln('Choose your mode:'); writeln('0 - Square Number Calculator'); writeln('1 - Triangular Number Calculator'); writeln('2 - Multiplication'); writeln('3 - Real Division'); writeln('4 - Addition'); writeln('5 - Subtraction'); writeln('6 - Exponentiation'); writeln('7 - Credits, thanks!'); readln(entrance); {IF Section} if entrance = 0 then Square; if entrance = 1 then Triangle; if entrance = 2 then Multiplication; if entrance = 3 then Division; if entrance = 4 then Addition; if entrance = 5 then Subtraction; if entrance = 6 then Exponentiation; if entrance = 7 then Credits; if entrance >= 8 then Other; if entrance = -2147483647 then writeln('Think Different, see the Extraordinary.'); if entrance = -2147483646 then writeln('One day, I saw the sunset fourty-four times! - The Little Prince, page 23'); {Final Section} writeln(); writeln(' Thanks for using ISI Calculator ', version,'.0!'); readln(); {Code finished. Original Name: iTomi Systems's Pascal Calculator} end. Category:Blog posts